#ifndef SMARTIOT_BIRD_FUNC
#define SMARTIOT_BIRD_FUNC
#include<opencv2/opencv.hpp>
#include <dirent.h>
#include <thread>
#include <functional>
#include <string>
#include <mutex>
#include <cmath>
#include <sys/time.h>
extern std::mutex mutex;
extern bool isOpen;
cv::Mat convertTo3Channels(const cv::Mat& binImg);
void getFileNames(std::string path, std::vector<std::string>& files);
double calc_dis(double x1,double y1,double x2,double y2);
void cameraThreadFunc(cv::VideoCapture& capture,std::string& rtsp,cv::Mat& pFrame);
double getTime();
class CMyContour{
	public:
		double x;
		double y;
		int num;
		std::vector<cv::Point>contour;
		CMyContour(std::vector<cv::Point_<int>>contour1, double x1, double y1, int num1);
	};
class CArea{
	public:
		double x;
		double y;
		std::vector<CMyContour>myContours;
		//int stamp;
		void add_contour(CMyContour);
		//CArea();
	};
#endif
